<?php


namespace App\Http\Services\FormBuilder\Components;


class DefaultDescription extends AbstractComponent
{
    private $defaultDescription;

    function __construct($defaultDescription)
    {
        $this->defaultDescription = html_entity_decode($defaultDescription);
    }

    public function render()
    {
        $result = '<p class="option-desc';
        if (!$this->defaultDescription) {
            $result .= ' display-none';
        }
        $result .= '">' . $this->defaultDescription . '</p>';

        return $result;
    }
}